package comm_serv

import (
	"ubt-aio-service/app/pkg/db"
	"ubt-aio-service/app/utils"
)

type commServ struct{}

var CommServ = commServ{}

// Areas 下拉选择省市区乡镇
func (s *commServ) Areas(pid string) *utils.ResJson {
	sqlStr := "SELECT area_id sel_id, area_name sel_name, area_id sel_code, false chked FROM sys_area WHERE parent_id=$1 ORDER BY area_id"
	return db.GetAll(sqlStr, pid)
}
